home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / converters / pbmplus / doc / pbm.doc < prev    next >
Encoding:
Text File  |  1990-06-20  |  3.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4. pbm(5)                      PBM Plus                       pbm(5)
  5.  
  6.  
  7.  
  8. NAME
  9.      pbm - portable bitmap file format
  10.  
  11. DESCRIPTION
  12.      The portable bitmap format is a lowest common denominator
  13.      monochrome file format.  It was originally designed to make
  14.      it reasonable to mail bitmaps between different types of
  15.      machines using the typical stupid network mailers we have
  16.      today.  Now it serves as the common language of a large fam-
  17.      ily of bitmap conversion filters.  The definition is as fol-
  18.      lows:
  19.  
  20.      - A "magic number" for identifying the file type.  A pbm
  21.        file's magic number is the two characters "P1".
  22.  
  23.      - Whitespace (blanks, TABs, CRs, LFs).
  24.  
  25.      - A width, formatted as ASCII characters in decimal.
  26.  
  27.      - Whitespace.
  28.  
  29.      - A height, again in ASCII decimal.
  30.  
  31.      - Whitespace.
  32.  
  33.      - Width * height bits, each either '1' or '0', starting at
  34.        the top-left corner of the bitmap, proceding in normal
  35.        English reading order.
  36.  
  37.      - The character '1' means black, '0' means white.
  38.  
  39.      - Whitespace in the bits section is ignored.
  40.  
  41.      - Characters from a "#" to the next end-of-line are ignored
  42.        (comments).
  43.  
  44.      - No line should be longer than 70 characters.
  45.  
  46.      Here is an example of a small bitmap in this format:
  47.  
  48.      P1
  49.      # feep.pbm
  50.      24 7
  51.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  52.      0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
  53.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
  54.      0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
  55.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
  56.      0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
  57.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Printed 5/25/90         21 September 1989                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. pbm(5)                      PBM Plus                       pbm(5)
  71.  
  72.  
  73.  
  74.      Programs that read this format should be as lenient as pos-
  75.      sible, accepting anything that looks remotely like a bitmap.
  76.  
  77.      There is also a variant on the format, available by setting
  78.      the RAWBITS option at compile time.  This variant is dif-
  79.      ferent in the following ways:
  80.  
  81.      - The "magic number" is "P4" instead of "P1".
  82.  
  83.      - The bits are stored eight per byte, high bit first low bit
  84.        last.
  85.  
  86.      - No whitespace is allowed in the bits section.
  87.  
  88.      - The files are eight times smaller and many times faster to
  89.        read and write.
  90.  
  91. SEE ALSO
  92.      brushtopbm(1), cmuwmtopbm(1), g3topbm(1), icontopbm(1), gem-
  93.      topbm(1), macptopbm(1), mgrtopbm(1), pbmlife(1), pbmmake(1),
  94.      pbmmask(1), pbmpaste(1), pbmreduce(1), pbmtoascii(1),
  95.      pbmtobbnbg(1), pbmtocmuwm(1), pbmtog3(1), pbmtogo(1),
  96.      pbmtoicon(1), pbmtolj(1), pbmtomacp(1), pbmtomgr(1),
  97.      pbmtoptx(1), pbmtorast(1), pbmtox10bm(1), pbmtoxbm(1),
  98.      pbmtoxwd(1), pbmupc(1), pcxtopbm(1), picttopbm(1), rast-
  99.      topbm(1), xbmtopbm(1), xwdtopbm(1), pnm(5), pgm(5), ppm(5)
  100.  
  101. AUTHOR
  102.      Copyright (C) 1989 by Jef Poskanzer.
  103.  
  104.      Permission to use, copy, modify, and distribute this
  105.      software and its documentation for any purpose and without
  106.      fee is hereby granted, provided that the above copyright
  107.      notice appear in all copies and that both that copyright
  108.      notice and this permission notice appear in supporting docu-
  109.      mentation.  This software is provided "as is" without
  110.      express or implied warranty.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Printed 5/25/90         21 September 1989                       2
  130.  
  131.  
  132.  
  133.